<?php

include_once("commonFunctions.php");
$selectedState = $_GET['selectedState'];
$_SESSION['state'] =  $_GET['selectedState'];
$query = "select distinct storeAbbrev from stores where state='$selectedState';";
$result = mysql_query($query) or die("query failed");

echo '<select name="storeAbbrev" id="storeAbbrev" onchange="storeAbbrevChange(this.value)">';
while ($row = mysql_fetch_array($result)) {
    echo "<option value = \"{$row['storeAbbrev']}\">{$row['storeAbbrev']}</option>";
}
echo '</select>';
?>